import request from '../utils/request'

//出入库列表
export function stockList(data) {
  return request({
    url: '/stock/stock_list',
    method: 'post',
    data
  })
}

//出入库单操作
export function stockHandle(data) {
  return request({
    url: '/stock/stock_handle',
    method: 'post',
    data
  })
}

//出入库单删除
export function stockDel(data) {
  return request({
    url: '/stock/stock_del',
    method: 'post',
    data
  })
}

//出入库详情删除
export function detailDel(data) {
  return request({
    url: '/stock/detail_del',
    method: 'post',
    data
  })
}

//出入库数据详情
export function stockDetail(data) {
  return request({
    url: '/stock/stock_detail',
    method: 'post',
    data
  })
}

//库存收发明细
export function stockMsg(data) {
  return request({
    url: '/stock/stock_msg',
    method: 'post',
    data
  })
}

//库存收发明细导出
export function stockMsgExport(data) {
  return request({
    responseType: 'blob',
    url: '/stock/stock_msg_export',
    method: 'get',
    params: data
  })
}

//库存余额
export function stockBalance(data) {
  return request({
    url: '/stock/stock_balance',
    method: 'post',
    data
  })
}

//列表模板打印
export function listPrint(data) {
  return request({
    responseType: 'blob',
    url: '/stock/listPrint',
    method: 'get',
    params: data
  })
}

//明细模板打印
export function print(data) {
  return request({
    responseType: 'blob',
    url: '/stock/print',
    method: 'get',
    params: data
  })
}